/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.image.entity.Image
   Module Description   :

   Date Created      : 2009/11/19
   Original Author   : ellen.li
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.image.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author ellen.li
 * 
 */
@Entity
@Table(name = "EC_IMAGE_MAIN")
public class Image extends BaseEntity {
	/**
	 * 图檔类型
	 */
	public enum IMG_TYPE {
		MAIN("MAIN"), RMAIN("RMAIN"), ICON("ICON"), DESC("DESC"), IMGB("IMGB"), IMGS("IMGS"), MSPEC("MSPEC"), RMSPEC(
				"RMSPEC"), PRDT("PRDT");
		String value;

		IMG_TYPE(String i) {
			value = i;
		}

		public String getValue() {
			return value;
		}
	}

	/**
	 * serial version
	 */
	private static final long serialVersionUID = 1361201662689119657L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_image")
	@SequenceGenerator(name = "seq_ec_image", sequenceName = "SEQ_EC_IMAGE")
	@Column(name = "IMAGE_ID")
	private Long id;

	@Column(name = "PRODUCT_ID", length = 8)
	private String productId;

	@Column(name = "IMAGE_type", length = 10)
	private String type;

	@Column(name = "IMG_FILE_PATH", length = 200)
	private String imgFilePath;

	@Column(name = "IMG_SIZE", length = 20)
	private String imgSize;

	@Column(name = "SHOW_SEQ")
	private int showSeq;

	@Column(name = "IS_DELETE", columnDefinition = "VARCHAR2(2 CHAR) default 'N'")
	private String isDelete;

	@Column(name = "PIC_DESC", length = 30)
	private String picDesc;

	/**
	 * 主规格图檔编号
	 */
	@Column(name = "MAIN_SPEC_ID")
	private Long mainSpecId;

	/**
	 * 小张规格细节图的父规格细节图编号
	 */
	@Column(name = "PARENT_ID")
	private Long parentId;

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the productId
	 */
	public String getProductId() {
		return productId;
	}

	/**
	 * @param productId the productId to set
	 */
	public void setProductId(String productId) {
		this.productId = productId;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the imgSize
	 */
	public String getImgSize() {
		return imgSize;
	}

	/**
	 * @param imgSize the imgSize to set
	 */
	public void setImgSize(String imgSize) {
		this.imgSize = imgSize;
	}

	/**
	 * @return the showSeq
	 */
	public int getShowSeq() {
		return showSeq;
	}

	/**
	 * @param showSeq the showSeq to set
	 */
	public void setShowSeq(int showSeq) {
		this.showSeq = showSeq;
	}

	/**
	 * @return the imgFilePath
	 */
	public String getImgFilePath() {
		return imgFilePath;
	}

	/**
	 * @param imgFilePath the imgFilePath to set
	 */
	public void setImgFilePath(String imgFilePath) {
		this.imgFilePath = imgFilePath;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	public String getPicDesc() {
		return picDesc;
	}

	public void setPicDesc(String picDesc) {
		this.picDesc = picDesc;
	}

	public Long getMainSpecId() {
		return mainSpecId;
	}

	public void setMainSpecId(Long mainSpecId) {
		this.mainSpecId = mainSpecId;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
}